if (-not $IsLinux -and -not $IsMacOS) {
    . $PSScriptRoot/../end-to-end-tests-prelude.ps1
    $iiroot = "$PSScriptRoot/../e2e-ports/integrate-install"

    $env:KMPKG_BINARY_SOURCES="clear;default,read"
    $env:KMPKG_KEEP_ENV_VARS="KMPKG_KEEP_ENV_VARS;KMPKG_BINARY_SOURCES;KMPKG_FORCE_SYSTEM_BINARIES;KMPKG_DOWNLOADS;KMPKG_DEFAULT_BINARY_CACHE"

    # Test msbuild props and targets
    $Script:CurrentTest = "zlib:x86-windows msbuild $iiroot\..."
    Write-Host $Script:CurrentTest
    Run-Kmpkg @CommonArgs install zlib:x86-windows
    Throw-IfFailed
    foreach ($project in @("Project1", "NoProps")) {
        $Script:CurrentTest = "msbuild $iiroot\$project.vcxproj"
        Write-Host $Script:CurrentTest
        Run-Kmpkg @commonArgs env "msbuild $iiroot\$project.vcxproj /p:KMPKG_ROOT=$KmpkgRoot /p:KmpkgRoot=$TestingRoot /p:IntDir=$TestingRoot\int\ /p:OutDir=$TestingRoot\out\ "
        Throw-IfFailed
        Remove-Item -Recurse -Force $TestingRoot\int
        Remove-Item -Recurse -Force $TestingRoot\out
    }

    $Script:CurrentTest = "zlib:x86-windows-static msbuild $iiroot\..."
    Write-Host $Script:CurrentTest
    Run-Kmpkg @CommonArgs install zlib:x86-windows-static
    Throw-IfFailed
    foreach ($project in @("KmpkgTriplet", "KmpkgTriplet2", "KmpkgUseStatic", "KmpkgUseStatic2")) {
        $Script:CurrentTest = "msbuild $iiroot\$project.vcxproj"
        Run-Kmpkg @commonArgs env "msbuild $iiroot\$project.vcxproj /p:KMPKG_ROOT=$KmpkgRoot /p:KmpkgRoot=$TestingRoot /p:IntDir=$TestingRoot\int\ /p:OutDir=$TestingRoot\out\ "
        Throw-IfFailed
        Remove-Item -Recurse -Force $TestingRoot\int
        Remove-Item -Recurse -Force $TestingRoot\out
    }

    # This test is currently disabled because it requires adding the ability to override the kmpkg executable into the msbuild props/targets.
    # Require-FileNotExists $installRoot/x64-windows-static/include/zlib.h
    # Require-FileNotExists $installRoot/x64-windows/include/zlib.h
    # Require-FileExists $installRoot/x86-windows/include/zlib.h
    # $Script:CurrentTest = "msbuild $iiroot\KmpkgUseStaticManifestHost.vcxproj"
    # ./kmpkg $commonArgs env "msbuild $iiroot\KmpkgUseStaticManifestHost.vcxproj /p:KMPKG_ROOT=$KmpkgRoot `"/p:_KmpkgExecutable=$KmpkgExe`" /p:KmpkgRoot=$TestingRoot /p:IntDir=$TestingRoot\int\ /p:OutDir=$TestingRoot\out\ /p:TestingKmpkgInstalledDir=$installRoot"
    # Throw-IfFailed
    # Require-FileExists $installRoot/x64-windows-static/include/zlib.h
    # Require-FileNotExists $installRoot/x86-windows/include/zlib.h
}
